package io.renren.modules.business.dao;

import io.renren.modules.business.entity.BusAssessmentRecordEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 考勤记录实体类
 * 
 * @author liao mengqing
 */
@Mapper
public interface BusAssessmentRecordDao extends BaseMapper<BusAssessmentRecordEntity> {
    /**
     * 查询学生绩效考核记录
     * @return
     */
    List<Map<String, Object>> studentList();
    List<Map<String, Object>> studentByKey(String userName);

    /**
     * 查询导师绩效考核记录
     * @return
     */
    List<Map<String, Object>> tutorList();
    List<Map<String, Object>> tutorByKey(String userName);

    /**
     * 查询项目绩效考核记录
     * @return
     */
    List <Map<String, Object>> projectList();
    List<Map<String, Object>> projectByKey(String name);

    /**
     * 查询开发团队绩效考核记录
     * @return
     */
    List<Map<String, Object>> teamList();
    List<Map<String, Object>> teamByKey(String teamName);

    /**
     * 查询实验室绩效考核记录
     * @return
     */
    List<Map<String, Object>> labList();
    List<Map<String, Object>> labByKey(String labName);

    /**
     * 获取所有项目Id
     * @return
     */
    List<Long> allTeamId();

    /**
     * 团队绩效考核
     */
    List<Map<String, Object>> isTeamScore(Long teamId);
    Double studentScore (Long teamId);
    Double projectScore (Long teamId);
    void teamRecord (Long teamId, double score);
    void upTeamRecord (Long teamId, double score);
    Long newRecordId (Long teamId);
    void teamScore (Long recordId, Double stuScore, Double proScore);
    void upTeamScore (Long recordId, Double stuScore, Double proScore);

    /**
     * 实验室绩效考核
     */
    List<Map<String, Object>> isLabScore(Long labId);
    Double developScore (Long labId);
    Double tutorScore (Long labId);
    void labRecord (Long labId, double score);
    void upLabRecord (Long labId, double score);
    void labScore (Long recordId, double score);
    void upLabScore (Long recordId, double score);
    Long newLabRecordId (Long labId);

    List<Long> allLabIdList();
}
